package com.example.javapracticaltraining.entity.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.util.Date;
import lombok.Data;

/**
 * 服务评价表
 * @TableName service_evaluation
 */
@TableName(value ="service_evaluation")
@Data
public class ServiceEvaluation {
    /**
     * 
     */
    @TableId(value = "evaluation_id", type = IdType.AUTO)
    private Integer evaluationId;

    /**
     * 工单ID
     */
    @TableField(value = "ticket_id")
    private Integer ticketId;

    /**
     * 评价人ID
     */
    @TableField(value = "evaluator_id")
    private Integer evaluatorId;

    /**
     * 评价时间
     */
    @TableField(value = "evaluation_time")
    private Date evaluationTime;

    /**
     * 总体评分(1-5)
     */
    @TableField(value = "overall_score")
    private Integer overallScore;

    /**
     * 服务态度评分(1-5)
     */
    @TableField(value = "attitude_score")
    private Integer attitudeScore;

    /**
     * 服务质量评分(1-5)
     */
    @TableField(value = "quality_score")
    private Integer qualityScore;

    /**
     * 服务效率评分(1-5)
     */
    @TableField(value = "efficiency_score")
    private Integer efficiencyScore;

    /**
     * 服务及时性评分(1-5)
     */
    @TableField(value = "timeliness_score")
    private Integer timelinessScore;

    /**
     * 评价内容
     */
    @TableField(value = "comments")
    private String comments;

    /**
     * 改进建议
     */
    @TableField(value = "suggestion")
    private String suggestion;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ServiceEvaluation other = (ServiceEvaluation) that;
        return (this.getEvaluationId() == null ? other.getEvaluationId() == null : this.getEvaluationId().equals(other.getEvaluationId()))
            && (this.getTicketId() == null ? other.getTicketId() == null : this.getTicketId().equals(other.getTicketId()))
            && (this.getEvaluatorId() == null ? other.getEvaluatorId() == null : this.getEvaluatorId().equals(other.getEvaluatorId()))
            && (this.getEvaluationTime() == null ? other.getEvaluationTime() == null : this.getEvaluationTime().equals(other.getEvaluationTime()))
            && (this.getOverallScore() == null ? other.getOverallScore() == null : this.getOverallScore().equals(other.getOverallScore()))
            && (this.getAttitudeScore() == null ? other.getAttitudeScore() == null : this.getAttitudeScore().equals(other.getAttitudeScore()))
            && (this.getQualityScore() == null ? other.getQualityScore() == null : this.getQualityScore().equals(other.getQualityScore()))
            && (this.getEfficiencyScore() == null ? other.getEfficiencyScore() == null : this.getEfficiencyScore().equals(other.getEfficiencyScore()))
            && (this.getTimelinessScore() == null ? other.getTimelinessScore() == null : this.getTimelinessScore().equals(other.getTimelinessScore()))
            && (this.getComments() == null ? other.getComments() == null : this.getComments().equals(other.getComments()))
            && (this.getSuggestion() == null ? other.getSuggestion() == null : this.getSuggestion().equals(other.getSuggestion()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getEvaluationId() == null) ? 0 : getEvaluationId().hashCode());
        result = prime * result + ((getTicketId() == null) ? 0 : getTicketId().hashCode());
        result = prime * result + ((getEvaluatorId() == null) ? 0 : getEvaluatorId().hashCode());
        result = prime * result + ((getEvaluationTime() == null) ? 0 : getEvaluationTime().hashCode());
        result = prime * result + ((getOverallScore() == null) ? 0 : getOverallScore().hashCode());
        result = prime * result + ((getAttitudeScore() == null) ? 0 : getAttitudeScore().hashCode());
        result = prime * result + ((getQualityScore() == null) ? 0 : getQualityScore().hashCode());
        result = prime * result + ((getEfficiencyScore() == null) ? 0 : getEfficiencyScore().hashCode());
        result = prime * result + ((getTimelinessScore() == null) ? 0 : getTimelinessScore().hashCode());
        result = prime * result + ((getComments() == null) ? 0 : getComments().hashCode());
        result = prime * result + ((getSuggestion() == null) ? 0 : getSuggestion().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", evaluationId=").append(evaluationId);
        sb.append(", ticketId=").append(ticketId);
        sb.append(", evaluatorId=").append(evaluatorId);
        sb.append(", evaluationTime=").append(evaluationTime);
        sb.append(", overallScore=").append(overallScore);
        sb.append(", attitudeScore=").append(attitudeScore);
        sb.append(", qualityScore=").append(qualityScore);
        sb.append(", efficiencyScore=").append(efficiencyScore);
        sb.append(", timelinessScore=").append(timelinessScore);
        sb.append(", comments=").append(comments);
        sb.append(", suggestion=").append(suggestion);
        sb.append("]");
        return sb.toString();
    }
}